<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .myborder {
        border: 1px blueviolet solid;
    }
</style>

<body>
    <div id="div" style="color: red;" class="myborder" title="div1">
        这是一个div
    </div>
    <script>
    </script>

</body>

</html>